package com.hc.stepKeydbservice;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class KeyDatabaseHelper extends SQLiteOpenHelper {


	  private static final String DB_NAME = "drillData.db"; //数据库名称
	    private static final int version = 2; //数据库版本

	public KeyDatabaseHelper(Context context) {
		super(context, DB_NAME, null, version);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		  String sql = "create table stepKey(id varchar(20) not null ,addTime varchar(20) not null ,key varchar(20) not null,drillLength varchar(20) not null ," +
		  		"name varchar(60) not null );";   
		  
	       db.execSQL(sql);
		
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int arg1, int arg2) {
	
		db.execSQL("ALTER TABLE stepKey ADD COLUMN other STRING");  
	}


}
